<?php

namespace App\models\user;

use Illuminate\Database\Eloquent\Model;

/**
 * App\models\user\SteamUser
 *
 * @property int $id
 * @property int $uid
 * @property int $communityvisibilitystate
 * @property int $profilestate
 * @property string $personaname
 * @property string $lastlogoff
 * @property int $commentpermission
 * @property string $profileurl
 * @property string $avatar
 * @property string $avatarmedium
 * @property string $avatarfull
 * @property int $personastate
 * @property string $realname
 * @property string $primaryclanid
 * @property int $timecreated
 * @property int $personastateflags
 * @property string $loccountrycode
 * @property int $locstatecode
 * @property int $loccityid
 * @property string $steamID64
 * @property string $steamID
 * @property \Carbon\Carbon $created_at
 * @property \Carbon\Carbon $updated_at
 * @property string $deleted_at
 * @method static \Illuminate\Database\Query\Builder|\App\models\user\SteamUser whereId($value)
 * @method static \Illuminate\Database\Query\Builder|\App\models\user\SteamUser whereUid($value)
 * @method static \Illuminate\Database\Query\Builder|\App\models\user\SteamUser whereCommunityvisibilitystate($value)
 * @method static \Illuminate\Database\Query\Builder|\App\models\user\SteamUser whereProfilestate($value)
 * @method static \Illuminate\Database\Query\Builder|\App\models\user\SteamUser wherePersonaname($value)
 * @method static \Illuminate\Database\Query\Builder|\App\models\user\SteamUser whereLastlogoff($value)
 * @method static \Illuminate\Database\Query\Builder|\App\models\user\SteamUser whereCommentpermission($value)
 * @method static \Illuminate\Database\Query\Builder|\App\models\user\SteamUser whereProfileurl($value)
 * @method static \Illuminate\Database\Query\Builder|\App\models\user\SteamUser whereAvatar($value)
 * @method static \Illuminate\Database\Query\Builder|\App\models\user\SteamUser whereAvatarmedium($value)
 * @method static \Illuminate\Database\Query\Builder|\App\models\user\SteamUser whereAvatarfull($value)
 * @method static \Illuminate\Database\Query\Builder|\App\models\user\SteamUser wherePersonastate($value)
 * @method static \Illuminate\Database\Query\Builder|\App\models\user\SteamUser whereRealname($value)
 * @method static \Illuminate\Database\Query\Builder|\App\models\user\SteamUser wherePrimaryclanid($value)
 * @method static \Illuminate\Database\Query\Builder|\App\models\user\SteamUser whereTimecreated($value)
 * @method static \Illuminate\Database\Query\Builder|\App\models\user\SteamUser wherePersonastateflags($value)
 * @method static \Illuminate\Database\Query\Builder|\App\models\user\SteamUser whereLoccountrycode($value)
 * @method static \Illuminate\Database\Query\Builder|\App\models\user\SteamUser whereLocstatecode($value)
 * @method static \Illuminate\Database\Query\Builder|\App\models\user\SteamUser whereLoccityid($value)
 * @method static \Illuminate\Database\Query\Builder|\App\models\user\SteamUser whereSteamID64($value)
 * @method static \Illuminate\Database\Query\Builder|\App\models\user\SteamUser whereSteamID($value)
 * @method static \Illuminate\Database\Query\Builder|\App\models\user\SteamUser whereCreatedAt($value)
 * @method static \Illuminate\Database\Query\Builder|\App\models\user\SteamUser whereUpdatedAt($value)
 * @method static \Illuminate\Database\Query\Builder|\App\models\user\SteamUser whereDeletedAt($value)
 * @mixin \Eloquent
 * @property-read \App\models\user\User $user
 */
class SteamUser extends Model
{
    public static function getSteamUserBySteamID64($steamid64){
        return self::where('steamID64', $steamid64)->first();
    }

    public function user(){
        return $this->belongsTo(User::class, 'uid', 'id');
    }
}
